function [qhat,S,S_deriv1,S_deriv2]=predict_demand_share(x1_interest,x2_interest,w_spline,user)

        %%%%%%%%%%%%%%%%%%%%%%%%%%
        % UNPACK USER
        %%%%%%%%%%%%%%%%%%%%%%%%%%
        
[~,~,~,xi1,xi2,n1,n2,k1,k2,~,~]=user_unpack(user);

        %%%%%%%%%%%%%%%%%%%%%%%%%%
        % PREDICTION
        %%%%%%%%%%%%%%%%%%%%%%%%%%

[S, S_deriv1, S_deriv2]=construct_splines_twodim(x1_interest, x2_interest, xi1, xi2, n1,n2, k1,k2,-k1,-k2,n1-1,n2-1,0);
qhat = S*w_spline;

    %
